import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
    {
        path: '/',
        redirect: '/home',
        children: [
            {
                path: 'home',
                name: 'Name',
                component: () => import('@/views/Home/index.vue')
            }
        ]
    },
    {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/Home/index.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/category',
        name: 'Category',
        component: () => import('@/views/Category/index.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/buy',
        name: 'Buy',
        component: () => import('@/views/Buy/index.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/shopcart',
        name: 'Shopcart',
        component: () => import('@/views/Shopcart/index.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/center',
        name: 'Name',
        component: () => import('@/views/Center/index.vue'),
        meta: {
            showTab: true
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/Login/index.vue'),
        meta: {
            showTab: false
        }
    },
    {
        path: '/search',
        name: 'Search',
        component: () => import('@/views/Search/index.vue'),
        meta: {
            showTab: false
        }
    },
    {
        path: '/detail',
        name: 'Detail',
        component: () => import('@/views/Detail/index.vue'),
        meta: {
            showTab: false
        }
    }
]

export default routes